from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Edge()
driver.get('https://music.163.com/')
driver.maximize_window()
driver.find_element(By.ID, value='srch').send_keys('晚安')
driver.find_element(By.ID, value='srch').send_keys(Keys.ENTER)
time.sleep(2)
driver.switch_to.frame('g_iframe')
driver.find_element(By.XPATH, value='//ul[@class="m-tabs m-tabs-srch f-cb ztag"]/li[1]/a').click()
time.sleep(2)
driver.find_element(By.XPATH, value='//div[@class="item f-cb h-flag  "]/div/div/a[@id="song_285321"]').click()
# driver.find_element(By.ID, value='song_285321').click()